Encoding apparatus and program

ABSTRACT

A coding device executes coding having divided an image into blocks, and includes: a candidate obtainment unit that obtains a plurality of provisional motion vector candidates in a coding target block; an evaluation information obtainment unit that obtains a correspondence vector that is a vector having a same direction and a same magnitude as a direction and a magnitude of the obtained provisional motion vector candidates, and evaluation information of a search center indicated by the correspondence vector in a coded block; and a selection unit that, on the basis of the evaluation information, selects, from the plurality of provisional motion vector candidates, a number of motion vector candidates that is lower than the number of the plurality of provisional motion vector candidates.

TECHNICAL FIELD

The present invention relates to a coding device and a program.

BACKGROUND ART

Moving image coding standards include standards such as MPEG (MovingPicture Experts Group)-2, MPEG-4, MPEG-4/AVC (Advanced Video Coding),and the like. HEVC (High Efficiency Video Coding) is a next-generationmoving image coding standard that is expected to spread in the future.

A moving image coding standard defines intra-frame coding, in which thecoding processing is executed using information within a single imageframe, and inter-frame coding, in which the coding processing isexecuted using information from a plurality of image frames in timeseries. In inter-frame coding, the coding device executes processingwhich searches for a motion vector (called “motion search processing”hereinafter) using the image to be coded and a reference image. Themotion vector is a vector indicating coordinates in the reference imagewhere a cumulative value or the like of a pixel-by-pixel differencebetween the image to be coded and the reference image (an inter-framedifference value) is the lowest.

The coding device reduces the amount of information in a coding resultby coding the motion vectors and inter-frame difference values. Toreduce the amount of information in the coded motion vectors andinter-frame difference values, it is necessary for the coding device tosearch for a motion vector having good accuracy. The motion searchprocessing, which searches for accurate motion vectors, requires anenormous amount of computation. In the motion search processing, thecoding device derives the inter-frame difference value between the imageto be coded and the reference image in whole number or fractional pixelunits. It is for this reason that the motion search processing requiresan enormous amount of computation.

With a coding device, there are situations where a search region (aregion containing a search center) within the reference image where themotion search processing is executed is determined before the formalmotion search processing (the actual motion search processing). In thiscase, the coding device executes processing for searching for motionvectors on the search region before the formal motion search processing(advance search processing).

In the advance search processing, the coding device determines a searchregion within a reduced-size reference image using a reduced-size imageto be coded. The coding device reduces the image to be coded and thereference image to a size in which the pixels are one-eighth of theirlengths, for example. The coding device executes the advance searchprocessing on the search region in the reduced-size image to be codedand reference image in pixel units having a length of one-eighth of apixel (fractional pixel units), for example.

In the advance search processing, the coding device derives a motionvector having a rough level of accuracy for the reduced-size image to becoded. The coding device determines, as the search center within thereference image for the formal motion search processing, a positionindicated by a motion vector having the lowest inter-frame differencevalue among the multiple motion vectors searched out through the advancesearch processing. The coding device then executes the formal motionsearch processing on a region containing the search center determined inthe advance search processing (the search region).

Motion Vector Prediction (MVP) is defined in MPEG-4/AVC and HEVC. Inmotion vector prediction, the coding device derives a prediction vector,which is a vector of a result of motion vector prediction (MVP) in atarget block, on the basis of motion vectors in the blocks surroundingthe coding target block. The coding device codes a difference betweenthe pixel value at a position, in the target block, indicated by thefinal motion vector, and the pixel value at a position indicated by theprediction vector of the motion vector prediction (a predictionresidual). Accordingly, the coding device can improve the codingefficiency by efficiently searching for a position which is close to theposition indicated by the prediction vector in the motion vectorprediction and which has a low prediction residual.

There are therefore situations where the coding device executes motionsearch processing on a search region that contains the search center,using the position indicated by the prediction vector in the motionvector prediction as the search center. In HEVC, there are two types ofprediction vectors: a left prediction vector (left MVP), which isdetermined on the basis of the block located to the left of the codingtarget block, and an upper prediction vector (upper MVP), which isdetermined on the basis of the block located above the coding targetblock.

The coding device selects, from these two types of prediction vectors, aprediction vector that makes it possible to increase the codingefficiency. Because the coding device searches the search regionincluding the search center indicated by each prediction vector, thereare situations where HEVC has a greater amount of processing in themotion search processing (search processing amount) than the amount ofprocessing in the motion search processing of MPEG-4/AVC.

For this reason, the motion search processing in HEVC uses a pluralityof search center candidates originating from an advance search vector“MVpre”, which is the vector resulting from the advance searchprocessing, and the prediction vector in the motion vector prediction.To further reduce the amount of processing in the motion searchprocessing, it is necessary for the coding device to select (narrowdown) the search center candidates from among the plurality of searchcenter candidates and execute the formal motion search processing on asmall search region containing the small number of selected searchcenter candidates. In particular, when the coding device is implementedusing hardware such as LSI (Large Scale Integration) or an FPGA (FieldProgrammable Gate Array), the circuit scale can be reduced if the amountof processing in the motion search processing for each block is below acertain level.

To reduce the circuit scale of the hardware, there are situations wherethe search center candidates are selected so that the number of searchcenter candidates in each block is no greater than a certain number.According to PTL 1, when deriving an accurate motion vector in advancesearch processing performed on a reduced-size image, a coding devicecompares cost values of prediction vectors in motion vector predictionperformed on the reduced image (see PTL 1).

Because the search region in the advance search processing is broad, thesearch center candidates indicated by the prediction vectors in themotion vector prediction are often contained within the search regionused in the advance search processing. Accordingly, the coding devicecan obtain the cost value of each prediction vector in the motion vectorprediction performed on the reduced-size image when deriving the motionvectors in the advance search processing, even without executingadditional advance search processing.

In PTL 1, when deriving the motion vectors in the advance searchprocessing, the coding device derives an accurate motion vector and costvalue derived in the advance search processing performed on thereduced-size image, and also derives the cost values of two predictionvectors in the motion vector prediction performed on that reduced-sizeimage. The coding device then selects two search center candidates fromthree search center candidates on the basis of results of comparing thethree cost values with a threshold. Then, the coding device executes theformal motion search processing on the basis of the two selected searchcenter candidates.

CITATION LIST Patent Literature

-   [PTL 1] Japanese Patent No. 6259272

SUMMARY OF THE INVENTION Technical Problem

However, according to PTL 1, the prediction vectors in the motion vectorprediction performed in the advance search processing are different fromthe prediction vectors in the motion vector prediction performed in theformal motion search processing which follows the advance searchprocessing. MPEG-4/AVC and HEVC also support motion vectors in smallunits of pixels, and the coding device therefore executes the formalmotion search processing in small block units. In HEVC in particular, itis possible for blocks as small as, for example, 8×8 pixels to have amotion vector.

Conventional coding devices execute the advance search processing on areduced-size image, and the advance search processing is thereforeexecuted on a search region which had large block units prior to thesize reduction. For example, a conventional coding device first reducesa 32×32-pixel block to a size which is one-eighth the length, i.e., a4×4-pixel block, and then executes the advance search processing on thesearch region in units of blocks in the reduced-size image. Assumingthat the blocks in an unreduced image in the advance search processingand the blocks in the image in the formal motion search processing aresimilarly small blocks, the blocks in the reduced-size image in theadvance search processing will be too small, e.g., 2×2 pixels. It isdifficult for a conventional coding device to capture the general motionbetween frames using blocks that are too small in this manner. Thus fora coding device to capture the general motion between frames, it isnecessary for the blocks in the search region to have different sizesbetween the advance search processing and the formal motion searchprocessing.

The prediction vector in motion vector prediction is a motion vector ina block which is at a position relative to the target block (e.g., tothe left or above the target block). Accordingly, when the size of theblocks in the search region differs between the advance searchprocessing and the formal motion search processing, the predictionvectors in the motion vector prediction will also differ between theadvance search processing and the formal motion search processing.Assuming the advance search processing is executed in blocks of 32×32pixels and the formal motion search processing is executed in blocks of8×8 pixels, the 32×32 pixel blocks will have one set of predictionvectors, i.e., a left prediction vector and an upper prediction vector,in the advance search processing.

A 32×32-pixel block is constituted by 16 blocks, each of which is 8×8pixels. In the formal motion search processing, each block of 32×32pixels has one set of prediction vectors in the motion vectorprediction. In contrast, in the advance search processing, each block of32×32 pixels may have 16 sets of different left prediction vectors andupper prediction vectors. Even if, in the advance search processing, thecoding device selects the search center candidates indicated by theprediction vectors in the motion vector prediction, the predictionvectors in the motion vector prediction performed in the formal motionsearch processing will be different from the prediction vectors in themotion vector prediction for which the cost values are compared in theadvance search processing, which causes a drop in the coding efficiency.

In this manner, a conventional coding device selects search centercandidates in units of image blocks in the advance search processing.The size of the image blocks in the advance search processing is oftenlarger than the size of the image blocks in the formal motion searchprocessing. As a result, the conventional coding device cannot switchthe processing performed on the search center candidates in units ofimage blocks in the formal motion search processing, which causes a dropin the coding efficiency. Thus the conventional coding device has aproblem in that when the search processing amount is reduced, a drop inthe coding efficiency cannot be suppressed.

In view of the foregoing circumstances, an object of the presentinvention is to provide a coding device and a program capable ofsuppressing a drop in coding efficiency even when a search processingamount has been reduced.

Means for Solving the Problem

One aspect of the present invention is a coding device that executescoding having divided an image into blocks, the device including: acandidate obtainment unit that obtains a plurality of provisional motionvector candidates in a coding target block; an evaluation informationobtainment unit that obtains a correspondence vector that is a vectorhaving a same direction and a same magnitude as a direction and amagnitude of the obtained provisional motion vector candidates, andevaluation information of a search center indicated by thecorrespondence vector in a coded block; and a selection unit that, onthe basis of the evaluation information, selects, from the plurality ofprovisional motion vector candidates, a number of motion vectorcandidates that is lower than the number of the plurality of provisionalmotion vector candidates.

One aspect of the present invention is the above-described codingdevice, in which the correspondence vector is the provisional motionvector candidate when the coded block is the coding target block.

One aspect of the present invention is the above-described codingdevice, in which the evaluation information obtainment unit: sets theevaluation information of the provisional motion vector candidate of thecorrespondence vector for which a search center is located in a searchregion of the coded block to be equal to the evaluation information ofthe correspondence vector; and sets the evaluation information of theprovisional motion vector candidate of the correspondence vector forwhich a search center is not located in the search region of the codedblock to be equal to a result of adding a code amount of the provisionalmotion vector candidate after being coded and a fixed value.

One aspect of the present invention is the above-described codingdevice, in which the evaluation information of the correspondence vectoris a value of a result of adding a code amount of the provisional motionvector candidate after being coded and a sum of absolute differences ofa pixel value.

One aspect of the present invention is the above-described codingdevice, in which the coded block: is a block to the left of the codingtarget block when the coding target block is not a block at a left edgeof the image; and is a block above the coding target block when thecoding target block is a block at the left edge of the image.

One aspect of the present invention is a program for causing a computerto function as the above-described coding device.

Effects of the Invention

According to the present invention, a drop in coding efficiency can besuppressed even when a search processing amount has been reduced.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram illustrating an example of the configuration of acoding device according to an embodiment.

FIG. 2 is a diagram illustrating an example of the configuration of aninter-prediction processing unit according to an embodiment.

FIG. 3 is a diagram illustrating an example of each of pixels adjacentto a coding processing target block according to an embodiment.

FIG. 4 is a diagram illustrating an example of a coding tree unit, anadvance search unit, and a prediction unit according to an embodiment.

FIG. 5 is a diagram illustrating an example of a search regioncontaining each of search ranges according to an embodiment.

FIG. 6 is a diagram illustrating an example of an advance search vectorand a prediction vector according to an embodiment.

FIG. 7 is a diagram illustrating an example of correspondence vectorsaccording to an embodiment.

FIG. 8 is a diagram illustrating an example of a correspondence vectorindicating outside a search region, according to an embodiment.

FIG. 9 is a flowchart illustrating an example of operations performed bythe coding device according to an embodiment.

DESCRIPTION OF EMBODIMENTS

Embodiments of the present invention will be described in detail withreference to the drawings.

First Embodiment

FIG. 1 is a diagram illustrating an example of the configuration of acoding device 1. The coding device 1 is a device that codes signals suchas moving images and the like. The coding device 1 encodes, for example,a frame of a moving image (an original image) on the basis of specifiedparameters 7. The following assumes that the coding device 1 executesmoving image coding processing according to H.264/AVC, HEVC, or thelike, for example. The coding device 1 executes the coding processing inunits of target blocks. In HEVC, the target block (coding block) iscalled a Coding Unit (CU). The coding units constitute a coding treeunit (CTU).

The coding device 1 includes an original image shaping unit 101, anintra-prediction processing unit 102, an inter-prediction processingunit 103, a prediction residual signal generating unit 104, atransform/quantization processing unit 105, an entropy coding unit 106,an inverse quantization/inverse transform processing unit 107, a decodedsignal generating unit 108, and a loop filter processing unit 109.

Some or all of the functional units of the coding device 1 are realizedusing hardware such as LSI, for example. Some or all of the functionalunits of the coding device 1 may be realized as software by a processorsuch as a Central Processing Unit (CPU) executing programs stored in astorage unit. The storage unit is preferably a non-volatile storagemedium (non-transitory recording medium) such as flash memory or HDD(Hard Disk Drive), for example. The storage unit may include a volatilerecording medium such as RAM (Random Access Memory). The storage unitstores programs and image data, for example.

The original image shaping unit 101 acquires an original image signal(frames of a moving image) in raster scan order. The original imageshaping unit 101 shapes the original image data into target block units.The original image shaping unit 101 outputs the original image data tothe prediction residual signal generating unit 104 and theinter-prediction processing unit 103 in units of target blocks.

The intra-prediction processing unit 102 obtains a decoded signal fromthe decoded signal generating unit 108. The intra-prediction processingunit 102 executes intra-prediction on a target frame of the decodedsignal.

The inter-prediction processing unit 103 obtains the original imagesignal from the original image shaping unit 101 in units of targetblocks. The inter-prediction processing unit 103 obtains, as a referenceimage signal, the decoded signal which has been subjected to filteringprocessing from the loop filter processing unit 109.

The prediction residual signal generating unit 104 obtains the originalimage signal from the original image shaping unit 101 in units of targetblocks. The prediction residual signal generating unit 104 obtains apredictive signal from the intra-prediction processing unit 102 or theinter-prediction processing unit 103. When the prediction residualsignal generating unit 104 obtains the predictive signal from theintra-prediction processing unit 102, the predictive signal containsinformation representing the result of the intra-prediction. When theprediction residual signal generating unit 104 obtains the predictivesignal from the inter-prediction processing unit 103, the predictivesignal contains information representing the result of theinter-prediction. The prediction residual signal generating unit 104outputs a difference between the original image signal and thepredictive signal to the transform/quantization processing unit 105 as aprediction residual signal.

The transform/quantization processing unit 105 executes a direct cosinetransform such as a discrete cosine transform on the prediction residualsignal. The transform/quantization processing unit 105 quantizestransform coefficients. The transform/quantization processing unit 105outputs the quantized transform coefficients to the entropy coding unit106 and the inverse quantization/inverse transform processing unit 107.

The entropy coding unit 106 entropy-codes the quantized transformcoefficients. The entropy coding unit 106 outputs a bitstream of theentropy-coded transform coefficients to an external device such as adecoding device or the like. In this manner, the coding device 1 sends,to the external device such as a decoding device, a search result fromthe motion search processing.

The inverse quantization/inverse transform processing unit 107 obtainsthe quantized transform coefficients from the transform/quantizationprocessing unit 105. The inverse quantization/inverse transformprocessing unit 107 executes inverse quantization and inverse directcosine transform processing on the quantized transform coefficients. Theinverse quantization/inverse transform processing unit 107 then outputsa prediction residual decoded signal, which is a result of the inversequantization and inverse direct cosine transform processing, to thedecoded signal generating unit 108.

The decoded signal generating unit 108 obtains a predictive signal fromthe intra-prediction processing unit 102 or the inter-predictionprocessing unit 103. The decoded signal generating unit 108 generates adecoded signal of the coded target block by adding the predictionresidual decoded signal to the predictive signal.

The loop filter processing unit 109 executes filtering processing inwhich coding distortion is reduced on the decoded signal. The loopfilter processing unit 109 outputs, as a reference image signal, thedecoded signal which has been subjected to the filtering processing, tothe inter-prediction processing unit 103.

An example of the configuration of the inter-prediction processing unit103 will be described in detail next.

FIG. 2 is a diagram illustrating an example of the configuration of theinter-prediction processing unit 103. The inter-prediction processingunit 103 includes a reduced image generation unit 201, an advance searchprocess processing unit 202, a prediction vector generation unit 203, asearch center determination unit 204, a motion search processing unit205, and a motion search result storage unit 206.

The reduced image generation unit 201 obtains the original image and thereference image. The reduced image generation unit 201 executesreduction processing on the original image. The reduced image generationunit 201 executes reduction processing on the reference image at thesame reduction rate as the reduction rate used for the original image.The reduced image generation unit 201 outputs the reduced original imageand reference image to the advance search process processing unit 202.

The advance search process processing unit 202 executes advance searchprocessing using the reduced original image and reference image. Theadvance search process processing unit 202 takes an accurate motionvector, which is a result of the advance search processing, and outputsthat motion vector to the search center determination unit 204 as asingle advance search vector on a prediction block-by-prediction blockbasis. In HEVC, the prediction block (motion compensation block) is aprediction unit (PU).

The prediction vector generation unit 203 derives a prediction vectorfor motion vector prediction in the target block on a predictionblock-by-prediction block basis by executing motion vector prediction onthe basis of motion vectors of the blocks surrounding the target block.HEVC defines two types of motion vector prediction, and thus theprediction vector generation unit 203 outputs two prediction vectors tothe search center determination unit 204 for each prediction block.

The HEVC standard defines two methods of motion vector prediction inwhich prediction vectors are derived for each coding processing targetblock. In HEVC, the coding device can select a prediction vector havinggood coding efficiency. As such, the prediction vector generation unit203 derives two prediction vectors.

The search center determination unit 204 (a vector obtainment unit)obtains a single advance search vector for each prediction block as avector indicating a single search center candidate (called a “searchcenter candidate vector” hereinafter) from the advance search processprocessing unit 202. The search center determination unit 204 obtainsthe two prediction vectors for each prediction block as vectorsindicating two search center candidates (search center candidatevectors) from the prediction vector generation unit 203.

The search center determination unit 204 obtains, from the motion searchresult storage unit 206, a result of motion search processing performedon a prediction block earlier in terms of time (in the past) than themotion search processing performed on the current prediction block. Inother words, from the search center candidate vectors of the predictionblock immediately before the current prediction block (in the past), thesearch center determination unit 204 obtains, from the motion searchresult storage unit 206, a vector corresponding to a single advancesearch vector in the current prediction block as a search centercandidate vector of the current prediction block. From the search centercandidate vectors of the prediction block immediately before the currentprediction block (in the past), the search center determination unit 204obtains, from the motion search result storage unit 206, vectorscorresponding to the two prediction vectors in the current predictionblock as the search center candidate vectors of the current predictionblock.

A vector corresponding to a search center candidate vector will becalled a “correspondence vector” hereinafter. In other words, thecorrespondence vector is a past search center candidate vector from whena target block which has already been coded was the coding target block(a provisional motion vector candidate). The direction and magnitude ofthe correspondence vector for the search center candidate vector is thesame as the direction and magnitude of that search center candidatevector.

The search center determination unit 204 selects two search centercandidate vectors from among the three search center candidate vectorson the basis of a result of the motion search processing performed onthe past prediction block. The search center determination unit 204outputs the two selected search center candidate vectors to the motionsearch processing unit 205.

The search center determination unit 204 selects an optimal searchcenter candidate vector from among the one advance search vector and thetwo prediction vectors in the one prediction block immediately beforethe current prediction block. Through this, the search centerdetermination unit 204 can reduce the processing amount for the motionsearch processing without reducing the coding efficiency.

The motion search processing unit 205 obtains the original image and thereference image. The motion search processing unit 205 executes themotion search processing on a prediction block-by-prediction block basisin a region containing a search center indicated by the search centercandidate vector selected by the search center determination unit 204.The motion search processing unit 205 outputs the selected motion vector(a finalized motion vector) and a predicted difference image (apredicted difference signal) to the prediction residual signalgenerating unit 104.

The motion search result storage unit 206 stores the one advance searchvector and the two prediction vectors for the current single predictionblock as a motion search processing result for a set period of time. Theone advance search vector and the two prediction vectors which arestored are used by the search center determination unit 204 in theprocessing for selecting the optimal search center candidate vector inthe next prediction block following the current single prediction block.

The prediction vector generation unit 203 will be described in detailnext.

FIG. 3 is a diagram illustrating an example of each of pixels adjacentto a coding processing target block 301. When a coding mode of a codedtarget block (peripheral block) containing a pixel 302 “A0” to thelower-left of the target block 301 is a coding mode having a motionvector, the prediction vector generation unit 203 takes the motionvector of the coded target block containing the pixel 302 “A0” as aprediction vector “MVP1”. If the coding mode of the coded target blockcontaining the pixel 302 “A0” to the lower-left of the target block 301is not a coding mode having a motion vector, the prediction vectorgeneration unit 203 takes the motion vector of a coded target blockcontaining a pixel 303 “A1” as the prediction vector “MVP1”.

The prediction vector generation unit 203 determines a prediction vectorfor a pixel above the target block 301 in the same manner. In a casesuch as that described next, the prediction vector generation unit 203takes the motion vector of a coded target block containing a pixel 304“B0” as a prediction vector “MVP2”. The stated case is one in which thecoding mode of the coded target block containing the pixel 304 “B0” tothe upper-right of the target block 301 (a peripheral block) is a codingmode having a motion vector. When the coding mode of the coded targetblock containing the pixel 304 “B0” to the upper-right of the targetblock 301 is not a coding mode having a motion vector, the predictionvector generation unit 203 performs a determination as follows. Thestated determination is a determination as to whether or not the codingmode of the coded target block containing a pixel 305 “B1” on theupper-right of the target block 301 is a coding mode having a motionvector. When the coding mode of the coded target block containing thepixel 305 “B1” on the upper-right of the target block 301 is a codingmode having a motion vector, the prediction vector generation unit 203takes the motion vector of the coded target block containing the pixel305 “B1” as the prediction vector “MVP2”. When the coding mode of thecoded target block containing the pixel 305 “B1” on the upper-right ofthe target block 301 is not a coding mode having a motion vector, theprediction vector generation unit 203 takes the motion vector of a codedtarget block containing a pixel 306 “B2” as the prediction vector“MVP2”.

In this manner, the prediction vector generation unit 203 generates theone prediction vector “MVP1” for the motion vector prediction on thebasis of the pixel 302 or the pixel 303. The prediction vectorgeneration unit 203 generates the one prediction vector “MVP2” for themotion vector prediction on the basis of the pixel 304, the pixel 305,or the pixel 306. The prediction vector generation unit 203 outputs theprediction vectors “MVP1” and “MVP2” for the motion vector prediction tothe search center determination unit 204. Note that the predictionvector generation unit 203 may output the motion vector of a targetblock (peripheral block) partway through coding as the predictionvector.

In HEVC, the coding device executes the motion vector prediction andmotion compensation processing in units of prediction blocks (predictionunits). The size of the prediction block ranges from 8×8 pixels to 64×64pixels. When the size of the prediction block on which the formal motionsearch processing is performed is small, such as 8×8 pixels, theprediction block will have a very small size, such as 2×2 pixels, as aresult of the original image being reduced by the reduced imagegeneration unit 201. This reduces the accuracy of the motion vectors inthe advance search processing.

In a case such as that described below as well, there are situationswhere the advance search process processing unit 202 executes theadvance search processing on a prediction block having a large size,such as 32×32 pixels, in order to ensure that the accuracy of the motionvectors does not drop in the advance search processing. The stated caseis a case where the size of the prediction block on which the formalmotion search processing is executed after the advance search processingis small, such as 8×8 pixels. In this case, the size of the predictionblock in the advance search processing executed by the advance searchprocess processing unit 202 is different from the size of the predictionblock in the formal motion search processing executed by the motionsearch processing unit 205. An advance search vector “MVpre” isgenerated by the advance search process processing unit 202 for eachprediction block having a large size, such as 32×32 pixels.

FIG. 4 is a diagram illustrating an example of a coding tree unit (CTU),an advance search unit, and a prediction unit (PU). In FIG. 4, the sizeof a coding tree unit 400, which is constituted by a plurality of codingunits that are the target blocks (coding blocks), is 64×64 pixels. Thesize of an advance search unit 401, which is the unit in which theadvance search processing is executed by the advance search processprocessing unit 202, is 32×32 pixels. The size of a prediction unit 500,which is the unit in which the motion search processing is performed bythe motion search processing unit 205, is 8×8 pixels.

The search center candidates indicated by the prediction vectors “MVP1”and “MVP2” differ in each prediction unit 500 having a size of 8×8pixels. Accordingly, there are 64 sets of the prediction vectors “MVP1”and “MVP2” in the coding tree unit 400.

The search center candidate indicated by the advance search vector“MVpre” is different in each advance search unit having a size of 32×32pixels. As such, in the coding tree unit 400, there are a total of fouradvance search vectors “MVpre” in advance search units 401 to 404.

Accordingly, each prediction unit includes an advance search vectorindicating a single search center candidate and prediction vectorsindicating two search center candidates. The sizes of the predictionunit, the advance search unit, and the coding tree unit which sharethese three search center candidates are different from each other. Anexample will be described in which the search center determination unit204 selects the optimal search center candidate vector from among thethree search center candidate vectors, i.e., the advance search vectors“MVpre” generated by the advance search process processing unit 202 andthe prediction vectors “MVP1” and “MVP2” generated by the predictionvector generation unit 203.

FIG. 5 is a diagram illustrating an example of a search regioncontaining each of search ranges. The following three shapes are allquadrangles having with a size of “number of horizontal pixels×number ofvertical pixels=W×H”. The first is the shape of a search range 601,which contains the search center candidate indicated by an advancesearch vector 700 “MVpre_1”. The second is the shape of a search range602, which contains the search center candidate indicated by aprediction vector 701 “MVP1_1”. The third is the shape of a search range603, which contains the search center candidate indicated by aprediction vector 702 “MVP2_1”. When the advance search vector 700“MVpre_1” and the prediction vector 701 “MVP1_1” have been selected astwo search center candidate vectors for the prediction unit 500, asearch region 600 includes each search center candidate indicated by thetwo search center candidate vectors. For the prediction unit 500, thesearch region 600 does not include the search range 603, which containsthe search center candidate indicating the prediction vector 702“MVP2_1” that has not been selected.

In the following, a cost value is information expressing an evaluation(evaluation information). A low cost value indicates a higherevaluation. Search center candidate vectors having lower cost values(higher evaluations) are more suitable search center candidate vectors,and are therefore more likely to be selected by the search centerdetermination unit 204. As one example, the cost value is the sum(result of addition) of the code amount of a motion vector roughlyestimated when the motion vector is coded (called a “motion vector costvalue” hereinafter) and a sum of absolute differences. This sum ofabsolute differences may be a sum of absolute difference (SAD) betweenthe pixel values of the original image and the pixel values of thereference image indicated by the motion vector. Alternatively, the sumof absolute differences may be a sum of absolute transformed difference(SAID) resulting from executing a two-dimensional Hadamard transform onthe absolute value of the difference between the pixel values of theoriginal image and the pixel values of the reference image indicated bythe motion vector.

The motion search result storage unit 206 stores, for each of searchpoints (pixels in the search region 600), the cost values expressing theresults of the motion search processing performed on the search region600, in the formal motion search processing, among the formal motionsearch processing performed on each of the prediction units, which wasexecuted immediately previous. In FIG. 5, the motion search resultstorage unit 206 stores, for each of the search points, the cost valuesexpressing the results of the motion search processing performed on thesearch region 600, for the prediction unit 500. The substantial numberof search points is lower when the search range 601 and the search range602 at least partially overlap than when the search range 601 and thesearch range 602 do not overlap at all. The motion search result storageunit 206 stores a cost value for each of a maximum of 2×W×H searchpoints.

FIG. 6 is a diagram illustrating an example of the advance search vectorand the prediction vector. In a case such as that described below, thesearch center determination unit 204 obtains the following three vectorsas the three search center candidate vectors for a prediction unit 501.Here, the stated case is a case where the motion search processing isexecuted on the prediction unit 501 (coding target block) next after themotion search processing performed on the prediction unit 500 (a codedblock). The stated three vectors are an advance search vector 703“MVpre_2”, a prediction vector 704 “MVP1_2”, and a prediction vector 705“MVP2_2”.

FIG. 7 is a diagram illustrating an example of correspondence vectors.The search center determination unit 204 obtains, from the motion searchresult storage unit 206, the cost values of the vectors corresponding tothe respective three search center candidate vectors in the predictionunit 501 (correspondence vectors), for the result of the formal motionsearch processing executed immediately previous on the prediction unit500.

A correspondence vector 706 is a vector corresponding to the advancesearch vector 703 indicated in FIG. 6. The correspondence vector 706indicates a search center candidate 803 within the search region 600. Acorrespondence vector 707 is a vector corresponding to the predictionvector 704 indicated in FIG. 6. The correspondence vector 707 indicatesa search center candidate 804 within the search region 600. Acorrespondence vector 708 is a vector corresponding to the predictionvector 705 indicated in FIG. 6. The correspondence vector 708 indicatesa search center candidate 805 within the search region 600.

The search center determination unit 204 (an evaluation informationobtainment unit) takes the cost values of the correspondence vectors 706to 708 in the formal motion search processing executed immediately prioron the prediction unit 500 as the following values. The stated valuesare the cost values of the search center candidate vectors in the formalmotion search processing performed on the current prediction unit 501(that is, the advance search vector 703, the prediction vector 704, andthe prediction vector 705).

The search center determination unit 204 compares the cost values of thesearch center candidate vectors in the formal motion search processingperformed on the current prediction unit 501. The search centerdetermination unit 204 selects two search center candidate vectors, inorder from the vector having the lowest cost value, from the threesearch center candidate vectors. The search center determination unit204 takes the two selected search center candidate vectors as the twosearch center candidate vectors in the formal motion search processingperformed on the prediction unit 501.

In this manner, the search center determination unit 204 selects twosearch center candidate vectors from among the three search centercandidate vectors of the prediction unit 501. The search centerdetermination unit 204 selects the two search center candidatesindicated by the two selected search center candidate vectors as the twosearch centers in the formal motion search processing for the predictionunit 501.

FIG. 8 is a diagram illustrating an example of a correspondence vectorindicating outside the search region 600. There are situations where oneof the correspondence vectors indicates outside the search region 600.The search center candidate 803 indicated by the correspondence vector706 is located within the search region 600 of the prediction unit 500.The search center candidate 805 indicated by the correspondence vector708 is located within the search region 600 of the prediction unit 500.The motion search result storage unit 206 therefore stores the costvalue of the correspondence vector 706 and the cost value of thecorrespondence vector 708.

The search center candidate 804 indicated by the correspondence vector707 is not located within the search region 600 of the prediction unit500. The motion search result storage unit 206 therefore does not storethe cost value of the correspondence vector 707. As a result, the searchcenter determination unit 204 cannot refer to the cost value of thecorrespondence vector 707, and cannot compare the cost value of thecorrespondence vector 707 with the cost value of the correspondencevector 706 or 707.

In this manner, when the search center determination unit 204 cannotrefer to the cost value of one or more of the correspondence vectors,the search center determination unit 204 defines a sum of a parametervalue set in advance by a user or the like (a fixed value) and themotion vector cost value as the cost value of a correspondence vectorwhich cannot be referenced. This enables the search center determinationunit 204 to compare the cost value of a correspondence vector which canbe referenced with the cost value of a correspondence vector whichcannot be referenced.

An example of operations performed by the coding device 1 will bedescribed next with reference to FIGS. 6 to 8.

FIG. 9 is a flowchart illustrating an example of operations performed bythe coding device 1. The search center determination unit 204 startsprocessing of selecting the search center of the target prediction unit501 (step S101).

The search center determination unit 204 obtains the advance searchvector 703 “MVpre_2” indicated in FIG. 6 from the advance search processprocessing unit 202. The search center determination unit 204 sets theadvance search vector 703 “MVpre_2” as a search center candidate vector“SC_1”. The search center determination unit 204 obtains the predictionvector 704 “MVP1_2” and the prediction vector 705 “MVP2_2” from theprediction vector generation unit 203. The search center determinationunit 204 sets the prediction vector 704 “MVP1_2” as a search centercandidate vector “SC_2”. The search center determination unit 204 setsthe prediction vector 705 “MVP2_2” as a search center candidate vector“SC_3” (step S102).

To set cost values for the search center candidate vectors “SC_1”,“SC_2”, and “SC_3” in the processing from step S103 to step S110, thesearch center determination unit 204 substitutes 1 for an index “i”(step S103).

The search center determination unit 204 determines whether or not thesearch center of a search center candidate vector “SC_i” is within thesearch region 600 in the prediction unit 500 (immediately before theprediction unit 501) (step S104).

In the following case, the search center determination unit 204 obtains,from the motion search result storage unit 206, the cost value of acorrespondence vector of the search center candidate vector “SC_i” (avector corresponding to the search center candidate vector “SC_i”) (stepS105). The stated case is a case where the search center of the searchcenter candidate vector “SC_i” is within the search region 600 in theprediction unit 500 (step S104: YES).

The search center determination unit 204 sets the cost value of theobtained correspondence vector to be equal to a cost value “C_i” of thesearch center candidate vector “SC_i” in the prediction unit 501 (stepS106).

When the search center of the search center candidate vector “SC_i” isoutside the search region 600 in the prediction unit 500 (step S104:NO), the cost value of the correspondence vector is not stored in themotion search result storage unit 206. Accordingly, the search centerdetermination unit 204 roughly derives the code amount of the searchcenter candidate vector “SC_i” produced when the search center candidatevector “SC_i” is coded as the motion vector cost value. For example, themethod through which the search center determination unit 204 derivesthe motion vector cost value may be the same as the method through whichthe motion search processing unit 205 derives the code amount of themotion vector (the motion vector cost value) (step S107).

The search center determination unit 204 sets a result of adding aparameter value “P” (a fixed value) set in advance by a user or the likeand the motion vector cost value (a total value) to be equal to the costvalue “C_i” of the search center candidate vector “SC_i” (step S108).

The search center determination unit 204 adds 1 to the index “i” (stepS109).

The search center determination unit 204 determines whether or not theindex value is greater than the number of search center candidatevectors, i.e., 3 (step S109). If the value of the index “i” is less thanor equal to the number of search center candidate vectors, i.e., 3 (stepS109: NO), the search center determination unit 204 returns theprocessing to step S104.

If the value of the index “i” is greater than the number of searchcenter candidate vectors, i.e., 3 (step S109: YES), the search centerdetermination unit 204 compares the cost values of the search centercandidate vectors “SC_1”, “SC_2”, and “SC_3”. The search centerdetermination unit 204 selects two search center candidate vectors inorder from the vector having the lowest cost value. The search centerdetermination unit 204 selects the search center candidates indicated bythe two selected search center candidate vectors as the search centersfor the target prediction unit 501 (the current PU) (step S111).

The parameter value “P” in step S108 is a value corresponding to the sumof absolute differences (SAD or SATD) expressing a differential costvalue, and functions as a threshold with respect to cost values asidefrom the differential cost value (motion vector cost values). Thedescriptions assume that as indicated in FIG. 8, only the one searchcenter candidate 804 among the three search center candidates 803 to 805is outside the search region 600 of the prediction unit 500.

When the cost values of the search center candidate vectors indicatingthe two search center candidates 803 and 805 within the search region600 are lower than the following cost value, the search centerdetermination unit 204 takes the two search center candidates 803 and805 as the search centers of the prediction unit 501. The statedfollowing cost value is the cost value of the search center candidatevector indicated by the search center candidate 804, i.e., “parameterP+motion vector cost value”.

When the cost values of the search center candidate vectors indicatingthe two search center candidates 803 and 805 within the search region600 are higher than the following cost value, the search centerdetermination unit 204 does not select the two search center candidates803 and 805 as the search centers of the prediction unit 501. The statedfollowing cost value is the cost value of the search center candidatevector indicated by the search center candidate 804, i.e., “parameterP+motion vector cost value”.

When the cost values of the search center candidate vector indicated bythe two search center candidates 803 and 805 within the search region600 are equal to the cost value of the search center candidate vectorindicated by the search center candidate 804, the parameter value “P”functions as a threshold with respect to the motion vector cost value.

If two or more search center candidates among the three search centercandidates are outside the search region 600 of the prediction unit 500(the immediately-previous PU), the parameter “P” is canceled out bycomparing the cost values of the search center candidate vectorsindicating the search center candidates outside the search region 600.Accordingly, the search center determination unit 204 selects the searchcenter candidate indicating the search center candidate vector with alow motion vector cost value as the search center of the prediction unit501.

As described thus far, the coding device 1 according to the embodimentexecutes coding after dividing (shaping) an image into target blocks.The coding device 1 according to the embodiment includes the searchcenter determination unit 204 (a candidate obtainment unit, anevaluation information obtainment unit, and a selection unit). Thesearch center determination unit 204 obtains a plurality of searchcenter candidate vectors (provisional motion vector candidates) in acoding target block. The search center determination unit 204 obtains acorrespondence vector which is a vector having the same direction andmagnitude as the direction and magnitude of the obtained search centercandidate vector. The search center determination unit 204 obtainsevaluation information of the search center indicated by thecorrespondence vector in a coded target block. On the basis of theevaluation information, the search center determination unit 204selects, from the plurality of search center candidate vectors, a numberof search center candidate vectors (motion vector candidates) that islower than the number of the plurality of search center candidatevectors.

Through this, the coding device 1 according to the embodiment uses theresults of the motion search for an already-coded block to narrow downthe motion vector candidates. The coding device 1 according to theembodiment determines the search center candidates on the basis of theresults of the formal motion search processing performed on the blocksin the periphery of the target block, without loading the pixel values.In other words, the coding device 1 according to the embodiment comparesthe cost values (evaluation information) of the search center candidatesindicated by the correspondence vectors for the accurate predictionvectors of the motion vector prediction (MVP), and selects the searchcenter candidate vector for the current prediction block on the basis ofa result of the comparison, without additionally executing the advancesearch processing (an additional cost). In this manner, the codingdevice 1 according to the embodiment can suppress a drop in codingefficiency even when a search processing amount has been reduced.

By narrowing down the search center candidates on the basis of pastsearch results, the coding device 1 according to the embodiment need notexecute additional search processing and the like, which makes itpossible to greatly reduce the search processing amount. By narrowingdown the correspondence vectors for each prediction unit in the formalmotion search processing, the coding device 1 according to theembodiment can suppress a drop in the coding performance caused bydifferences in the sizes of the two blocks described next. The first isthe size of the blocks in the advance search processing. The second isthe size of the blocks in the formal motion search processing. Thecoding device 1 according to the embodiment can ensure that nodiscrepancies arise in the prediction vectors of the motion vectorprediction between the advance search processing and the formal motionsearch processing. Particularly when the block size of the predictionunit is small, such as 8×8 pixels, a shift of a single prediction unitis unlikely to make a major difference in the relative merits of thesearch center candidates. As such, the cost value of the search centercandidate vector of the current prediction unit (current PU) beingevaluated on the basis of the search results of the immediately-previousprediction unit (immediately-previous PU) does not greatly affect thecorrespondence vector selection result.

In the embodiment described above, the motion search result storage unit206 stores only the search results for the immediately-previousprediction unit, as one example. When the current prediction unit(current PU) is located at the left edge of the frame, theimmediately-previous prediction unit (immediately-previous PU) islocated at the right edge of the frame. As such, there is a greatdistance between the current prediction unit and theimmediately-previous prediction unit, which results in low correlationbetween the search results, and may cause a drop in the codingperformance depending on the result of the correspondence vectorselection. The motion search result storage unit 206 may store not onlythe search result of the immediately-previous prediction unit, but alsothe search result of the most recent prediction unit relative to thecurrent prediction unit located at the left edge of the frame of theoriginal image. In this case, if the search center candidate of theprediction unit on the left edge of the frame is selected, the searchcenter determination unit 204 may use not only the search result for theimmediately-previous prediction unit, but also the search result of themost recent prediction unit at the left edge of the frame. In thismanner, when the coding target block (prediction unit) is not a block onthe left edge of a frame of the original image, the most recentprediction unit is a block to the left, for example, of the codingtarget block. When the coding target block is a block on the left edgeof a frame of the original image, the most recent prediction unit is ablock above, for example, the coding target block. Because the searchcenter determination unit 204 can use a past search result from theprediction unit directly above the current prediction unit in the frame(a search result highly correlated with the current PU), a drop in thecoding performance can be suppressed.

In the embodiment described above, the search center determination unit204 obtains the cost value of a single correspondence vector in theimmediately-previous prediction unit (the cost value of a single searchcenter) from the motion search result storage unit 206. The cost valuemay be the total value of the cost values of a plurality of searchcenter candidate vectors (the cost values of a plurality of searchcenters). For example, the search center determination unit 204 obtainsthe cost values of the correspondence vectors in the result of theformal motion search processing performed on the immediately-previousprediction unit, for a total of nine search center candidates ±1 pointsabove, below, to the left, and to the right, centered on the searchcenter candidate indicated by the search center candidate vector in thecurrent prediction unit. The search center determination unit 204 mayselect the search center candidate vector by comparing the obtained costvalues. The cost value may be the median value of the cost values of aplurality of search center candidate vectors (the cost values of aplurality of search centers). As a result, the search centerdetermination unit 204 can select a search center candidate vectorhaving more accurately compared the cost values, without being affectedby noise and the like in the image.

The following can be given as an example of a summary of the foregoing.

The coding device 1 according to the embodiment executes motion searchprocessing and pixel value prediction using a temporal correlation of areference image with respect to an input image. The coding device 1according to the embodiment includes a reduced image generation unit, anadvance motion search processing unit, a prediction vector generationunit, a prediction vector generation unit, a search center determinationunit, a motion search processing unit, and a motion search resultstorage unit. The reduced image generation unit performs reductionprocessing on the input image and the reference image. The advancemotion search processing unit determines a first motion vector byexecuting advance motion search processing using a coding target blockof a reduced input image and a search region for an advance motionsearch in a reduced reference image, the images having been reduced atthe same ratio by the reduced image generation unit. The predictionvector generation unit derives two prediction vectors for MVP from theperipheral blocks of the target coding block and sets those predictionvectors as a second motion vector and a third motion vector. Using amotion search result of a past block, stored in the motion search resultstorage unit, the search center determination unit selects no more thantwo vectors from among the three vectors, i.e., the first motion vector,the second motion vector, and the third motion vector, and determinesthe selected vectors as vectors indicating a search center of the codingtarget block.

The motion search processing unit determines a search region for anactual motion search on the basis of the search center indicated by thetwo vectors determined by the search center determination unit, andexecutes motion search processing on each of points within the searchregion for the actual motion search. Here, the motion search processingunit defines a sum of a sum of absolute differences and a motion vectorcost value as a search cost value for each point in the search regionfor the actual motion search. Here, the sum of absolute differences is asum of absolute differences between the original image and the referenceimage indicated by the motion vector (SAD) or a sum of absolutedifferences of values resulting from performing a two-dimensionalHadamard transform on difference values (SATD). The motion vector costvalue is a motion vector cost value obtained by roughly estimating acode amount produced when the motion vector is coded. The motion searchprocessing unit searches for a point with the lowest search cost value.The motion search result storage unit stores the motion vector resultsat each point in the search region for the actual motion search and thecorresponding search cost values, which have been derived by the motionsearch processing unit, for a single coding target block. The searchcenter determination unit takes three motion vectors, i.e., the firstmotion vector, the second motion vector, and the third motion vector, assearch center candidates.

The search center determination unit determines whether or not the samevector as the search center candidate is present among the plurality ofmotion vectors stored in the motion search processing unit. If there isa vector which is the same as a search center candidate, the searchcenter determination unit sets the search cost value which is stored inthe motion search processing unit and corresponds to the same vector asa search center cost of the search center candidate.

If there is no vector that is the same as a search center candidate, thesearch center determination unit derives a code amount produced when thevector of the search center candidate is coded through the same methodas that used by the motion search processing unit to derive the motionvector cost value, and takes that code amount as a search center vectorcost value. If there is no vector that is the same as the search centercandidate, the search center determination unit takes a sum of adifference value parameter, which can be set to any desired value, andthe search center vector cost value as the cost value of the searchcenter of the search center candidate. Through this, the search centerdetermination unit determines the search center cost value of each ofthe search center candidates for the three motion vectors, i.e., thefirst motion vector, the second motion vector, and the third motionvector. Of the three search center cost values, the search centerdetermination unit determines the two search centers having the lowestvalues. The search center determination unit then determines the twosearch center candidates corresponding to the respective cost values asthe search centers for the coding target block.

The motion search result storage unit stores the motion vector result ateach point in the search region for the actual motion search, and thesearch cost values corresponding thereto, in the single block which wasmost recently derived (a first block). The motion search result storageunit also stores the most recently-derived block at the left edge sideof the screen as a second block. When the coding target block is not theblock at the left edge of the screen, the search center determinationunit determines, for the first block which is the one mostrecently-derived block, whether or not there is a vector identical tothe search center candidate among the motion vector results stored inthe motion search processing unit. When the coding target block is theblock at the left edge of the screen, the search center determinationunit determines, for the second block which is the one mostrecently-derived block at the left edge of the screen, whether there isa vector (a correspondence vector) identical to the search centercandidate among the motion vector results stored in the motion searchprocessing unit. If a vector identical to the search center candidate ispresent, the search center determination unit sets a search cost valuewhich corresponds to that identical vector (the correspondence vector)and which is stored in the motion search processing unit as the costvalue of the search center of the search center candidate.

The coding device in the foregoing embodiment may be implemented by acomputer. In this case, a program for implementing these functions maybe recorded in a computer-readable recording medium, and the functionsmay be implemented by loading the program recorded in the recordingmedium into a computer system and executing the program. Here, “computersystem” is assumed to include an OS, hardware such as peripheraldevices, and the like. Additionally, “computer-readable recordingmedium” refers to a portable medium such as a flexible disk, amagneto-optical disk, ROM, a CD-ROM, or the like, or a storage devicesuch as a hard disk which is built into the computer system.Furthermore, the “computer-readable recording medium” may also include amedium which holds the program for a set length of time, e.g., a mediumthat holds a program dynamically for a short period of time, such as acommunication line in the case of transmitting a program over a networksuch as the Internet or a communication line such as a telephone line,or volatile memory within the computer system that serves as a server orclient in such a case. The stated program may implement only some of theabove-described functions, and may further be capable of implementingthe above-described functions in combination with programs alreadyrecorded in the computer system, or may be implemented using aprogrammable logic device such as an FPGA (Field Programmable GateArray).

Although an embodiment of this invention have been described in detailabove with reference to the drawings, the specific configuration is notlimited to the embodiment, and designs and the like within the scope ofthe present invention are included.

For example, the decoding device may include at least some of thefunctional units of the coding device 1. In the embodiment describedabove, the coding device 1 sends the search result of the motion searchprocessing to the decoding device. However, instead of the coding device1 transmitting the search result of the motion search processing to thedecoding device, the decoding device may obtain the search result of themotion search processing by executing the same processing as the motionsearch processing executed by the coding device 1.

INDUSTRIAL APPLICABILITY

The present invention can be applied in a coding device that codes amoving image.

REFERENCE SIGNS LIST

-   1 Coding device-   101 Original image shaping unit-   102 Intra-prediction processing unit-   103 Inter-prediction processing unit-   104 Prediction residual signal generating unit-   105 Transform/quantization processing unit-   106 Entropy coding unit-   107 Inverse quantization/inverse transform processing unit-   108 Decoded signal generating unit-   109 Loop filter processing unit-   201 Reduced image generation unit-   202 Advance search process processing unit-   203 Prediction vector generation unit-   204 Search center determination unit-   205 Motion search processing unit-   206 Motion search result storage unit-   301 Target block-   302-306 Pixel-   400 Coding tree unit-   401-404 Advance search unit-   500-501 Prediction unit-   600 Search region-   601-603 Search range-   700 Advance search vector-   701 Prediction vector-   702 Prediction vector-   703 Advance search vector-   704 Prediction vector-   705 Prediction vector-   706-708 Correspondence vector-   803-805 Search center candidate

1. A coding device that executes coding having divided an image intoblocks, the device comprising: a processor; and a storage medium havingcomputer program instructions stored thereon, when executed by theprocessor, perform to: obtains a plurality of provisional motion vectorcandidates in a coding target block; obtains a correspondence vectorthat is a vector having a same direction and a same magnitude as adirection and a magnitude of the obtained provisional motion vectorcandidates, and evaluation information of a search center indicated bythe correspondence vector in a coded block; and, on the basis of theevaluation information, selects, from the plurality of provisionalmotion vector candidates, a number of motion vector candidates that islower than the number of the plurality of provisional motion vectorcandidates.
 2. The coding device according to claim 1, wherein thecorrespondence vector is the provisional motion vector candidate whenthe coded block is the coding target block.
 3. The coding deviceaccording to claim 1, wherein the computer program instructions furtherperform to sets the evaluation information of the provisional motionvector candidate of the correspondence vector for which a search centeris located in a search region of the coded block to be equal to theevaluation information of the correspondence vector; and sets theevaluation information of the provisional motion vector candidate of thecorrespondence vector for which a search center is not located in thesearch region of the coded block to be equal to a result of adding acode amount of the provisional motion vector candidate after being codedand a fixed value.
 4. The coding device according to claim 3, whereinthe evaluation information of the correspondence vector is a value of aresult of adding a code amount of the provisional motion vectorcandidate after being coded and a sum of absolute differences of a pixelvalue.
 5. The coding device according to claim 1, wherein the codedblock: is a block to the left of the coding target block when the codingtarget block is not a block at a left edge of the image; and is a blockabove the coding target block when the coding target block is a block atthe left edge of the image.
 6. A non-transitory computer-readable mediumhaving computer-executable instructions that, upon execution of theinstructions by a processor of a computer, cause the computer tofunction as the coding device according to claim 1.